﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CiticList.aspx.cs" Inherits="CTIPayService.CiticList" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />

    <script language="javascript" src="Script/Cal.aspx" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <telerik:radstylesheetmanager id="RadStyleSheetManager1" runat="server">
    </telerik:radstylesheetmanager>
    <telerik:radscriptmanager id="RadScriptManager1" runat="server">
    </telerik:radscriptmanager>
    <telerik:radajaxmanager runat="server" defaultloadingpanelid="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGridPay">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridPay" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnQueryPay">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridPay" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridLog">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridLog" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:radajaxmanager>
    <telerik:radtabstrip id="RadTabStrip1" runat="server" selectedindex="0" skin="Sunset"
        multipageid="RadMultiPage1">
        <Tabs>
            <telerik:RadTab runat="server" Selected="True" Text="消费明细">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="支付日志">
            </telerik:RadTab>
        </Tabs>
    </telerik:radtabstrip>
    <telerik:radmultipage id="RadMultiPage1" runat="server" selectedindex="0">
        <telerik:RadPageView ID="RadPageView1" runat="server">
            开始日期：<asp:TextBox ID="txtDateStart" runat="server" onclick="ShowCalendar(this)"></asp:TextBox>
            &nbsp;截止日期：<asp:TextBox ID="txtDateEnd" runat="server" 
                onclick="ShowCalendar(this)"></asp:TextBox>
            <asp:Button ID="btnQueryPay" runat="server" Text="查询" 
                onclick="btnQueryPay_Click" />
            &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="导出 Excel" />
            <telerik:RadGrid ID="RadGridPay" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" DataSourceID="sdsPay" GridLines="None" 
                PageSize="100" ShowGroupPanel="True" ShowFooter="True" 
                onitemdatabound="RadGridPay_ItemDataBound" Height="500px" 
            Skin="Sunset">
                <ExportSettings FileName="GridExport">
                </ExportSettings>
                <PagerStyle PagerTextFormat="翻页：{4} &amp;nbsp;当前第 {0}/{1} 页 第 {2} 到 {3}条 共 {5}条." />
                <MasterTableView DataSourceID="sdsPay">
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="TransDatetime" HeaderText="时间" SortExpression="TransDatetime"
                            UniqueName="TransDatetime">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="BatchNo" HeaderText="批次号" SortExpression="BatchNo"
                            UniqueName="BatchNo">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PosID" HeaderText="流水号" SortExpression="PosID"
                            UniqueName="PosID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TransType" HeaderText="类型" SortExpression="TransType"
                            UniqueName="TransType">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="OrderID" HeaderText="订单号" SortExpression="OrderID"
                            UniqueName="OrderID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TransAmt" HeaderText="金额" Aggregate="Sum" SortExpression="TransAmt"
                            UniqueName="TransAmt">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerName" HeaderText="客户姓名" SortExpression="CustomerName"
                            UniqueName="CustomerName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerPhone" HeaderText="客户电话" SortExpression="CustomerPhone"
                            UniqueName="CustomerPhone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CityOrig" HeaderText="起飞城市" SortExpression="CityOrig"
                            UniqueName="CityOrig">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CityDest" HeaderText="目的城市" SortExpression="CityDest"
                            UniqueName="CityDest">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Flight" HeaderText="航班号" SortExpression="Flight"
                            UniqueName="Flight">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Passengers" HeaderText="乘客" SortExpression="Passengers"
                            UniqueName="Passengers">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Flag" HeaderText="状态" Aggregate="Last" SortExpression="Flag" UniqueName="Flag">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" 
                    AllowDragToGroup="True">
                    <Selecting AllowRowSelect="True" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Duration="200" Type="OutQuint" />
                </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView2" runat="server">
            <telerik:RadGrid ID="RadGridLog" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataSourceID="sdsLog" GridLines="None" PageSize="15">
                <ExportSettings FileName="GridExport">
                </ExportSettings>
                <PagerStyle PagerTextFormat="翻页：{4} &amp;nbsp;当前第 {0}/{1} 页 第 {2} 到 {3}条 共 {5}条." />
                <MasterTableView DataKeyNames="LogID" DataSourceID="sdsLog">
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="LogID" DataType="System.Int64" HeaderText="编号"
                            ReadOnly="True" SortExpression="LogID" UniqueName="LogID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LogTime" DataType="System.DateTime" HeaderText="时间"
                            SortExpression="LogTime" UniqueName="LogTime">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LogType" HeaderText="类型" SortExpression="LogType"
                            UniqueName="LogType">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LogContent" HeaderText="内容" SortExpression="LogContent"
                            UniqueName="LogContent">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Duration="200" Type="OutQuint" />
                </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>
    </telerik:radmultipage>
    <asp:SqlDataSource ID="sdsPay" runat="server" ConnectionString="<%$ ConnectionStrings:CTIPay %>"
        SelectCommand="SELECT TransDatetime, BatchNo, PosID, TransType, OrderID, TransAmt, CustomerName, CustomerPhone, CityOrig, CityDest, Flight, Passengers, Flag FROM t_CITIC_Transfer WHERE (TransDatetime BETWEEN @date1 AND @date2) ORDER BY TransID DESC">
        <SelectParameters>
            <asp:Parameter DefaultValue="1950-1-1" Name="date1" />
            <asp:Parameter DefaultValue="2079-1-1" Name="date2" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="sdsLog" runat="server" ConnectionString="<%$ ConnectionStrings:CTIPay %>"
        SelectCommand="SELECT LogID, LogTime, LogType, LogContent FROM t_CITIC_Log WHERE (LogTime BETWEEN @date1 AND @date2) ORDER BY LogID DESC">
        <SelectParameters>
            <asp:Parameter DefaultValue="1950-1-1" Name="date1" />
            <asp:Parameter DefaultValue="2079-1-1" Name="date2" />
        </SelectParameters>
    </asp:SqlDataSource>
    <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" height="75px"
        width="75px">
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <img alt="Loading..." src="images/loading11.gif" style="border: 0px;" /><br />
        载入中…
    </telerik:radajaxloadingpanel>
    </form>
</body>
</html>
